package com.uenpay.im.entities;

import com.mcxtzhang.indexlib.IndexBar.bean.BaseIndexPinyinBean;
import com.qyx.android.entity.FriendEntity;

/**
 * Created by zhangxutong .
 * Date: 16/08/28
 */

public class ContactsIndexBean extends BaseIndexPinyinBean {

    public static final int CONTACTS_TYPE_COMMON = 1;
    public static final int CONTACTS_TYPE_SEARCH = 2;
    public static final int CONTACTS_TYPE_TOP = 3;
    public static final int CONTACTS_TYPE_BOTTOM = 4;

    private String name;//名字
    private boolean isTop;//是否是最上面的 不需要被转化成拼音的
    private int icon;
    private int type;
    private int unreadNum; //未读消息，有新朋友时提示
    private int contactsNum; //联系人总数

    private FriendEntity friendEntity;

    public ContactsIndexBean() {
    }

    public ContactsIndexBean(String name) {
        this.name = name;
    }

    public ContactsIndexBean(String name, int icon, boolean isTop) {
        this.name = name;
        this.isTop = isTop;
        this.icon = icon;
    }

    public ContactsIndexBean(int type, boolean isTop) {
        this.type = type;
        this.isTop = isTop;
    }

    public ContactsIndexBean(int type, int contactsNum) {
        this.type = type;
        this.contactsNum = contactsNum;
    }

    public ContactsIndexBean(String name, int icon, boolean isTop, int type) {
        this.name = name;
        this.isTop = isTop;
        this.icon = icon;
        this.type = type;
    }

    public ContactsIndexBean(String name, boolean isTop, int icon, int type, FriendEntity friendEntity) {
        this.name = name;
        this.isTop = isTop;
        this.icon = icon;
        this.type = type;
        this.friendEntity = friendEntity;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getUnreadNum() {
        return unreadNum;
    }

    public void setUnreadNum(int unreadNum) {
        this.unreadNum = unreadNum;
    }

    public FriendEntity getFriendEntity() {
        return friendEntity;
    }

    public void setFriendEntity(FriendEntity friendEntity) {
        this.friendEntity = friendEntity;
    }

    public int getIcon() {
        return icon;
    }

    public void setIcon(int icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public ContactsIndexBean setName(String name) {
        this.name = name;
        return this;
    }

    public boolean isTop() {
        return isTop;
    }

    public ContactsIndexBean setTop(boolean top) {
        isTop = top;
        return this;
    }

    public int getContactsNum() {
        return contactsNum;
    }

    public void setContactsNum(int contactsNum) {
        this.contactsNum = contactsNum;
    }

    @Override
    public String getTarget() {
        return name;
    }

    @Override
    public boolean isNeedToPinyin() {
        return !isTop;
    }


    @Override
    public boolean isShowSuspension() {
        return !isTop;
    }
}
